package myWindows;

import java.awt.FlowLayout;

import javax.swing.*;

public class JTestFlowLayout extends JMyVentana {
    public JTestFlowLayout() {
        //FlowLayout
        
        FlowLayout fl = new FlowLayout();
        //Asignar el Layout manager al contenedor principal
        this.getContentPane().setLayout(fl);
        
        //Agregamos un Label
        JLabel label = new JLabel("Escriba su nombre");
        this.getContentPane().add(label);
        
        //JTextField
        JTextField text = new JTextField(20);
        this.getContentPane().add(text);
        
        //JButton
        this.getContentPane().add(new JButton("Aceptar"));
        this.getContentPane().add(new JButton("Cancelar"));
        
        this.setResizable(true);
    }

    public static void main(String[] args) {
        JTestFlowLayout objWindow = new JTestFlowLayout();
        objWindow.setVisible(true);
    }
}
